package com.fegin.client.admin;

import com.fegin.Hystrix.admin.SysLogFeginHystrix;
import com.fegin.bean.admin.SysLog;
import com.fegin.bean.common.layuiBean.ResultPage;
import com.fegin.bean.common.layuiBean.VoPage;
import com.fegin.common.ServerNameConstant;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.Map;

/**
 * @author 张子艺
 * @packge com.fegin.client
 * @data 2019-01-16 14:21
 * @project currencycloud
 */
//微服务名字                         熔断器
@FeignClient(value = ServerNameConstant.ADMIN_SERVER, fallbackFactory = SysLogFeginHystrix.class)
public interface SysLogFegin {


    @RequestMapping(value = "/admin/log/findLog",
            method = RequestMethod.POST,
            consumes = MediaType.APPLICATION_JSON_VALUE
    )
    ResultPage<SysLog> findLogByPage(@RequestBody VoPage voPage);


    @RequestMapping(value = "/admin/log/insert",
            method = RequestMethod.POST,
            consumes = MediaType.APPLICATION_JSON_VALUE
    )
    Map<String, Object> insert(@RequestBody SysLog sysLog);


}
